package com.jzo2o.customer.controller.open;

import com.jzo2o.common.model.Result;
import com.jzo2o.customer.model.dto.request.LoginForWorkReqDTO;
import com.jzo2o.customer.service.IRegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author itcast
 */
@RestController("openRegisterController")
@RequestMapping("/open/serve-provider/institution")
@Api(tags = "机构注册相关接口")
public class RegisterController {
    @Resource
    private IRegisterService registerService;

    @PostMapping("/register")
    @ApiOperation("服务人员/机构人员注册接口")
    public Result<?> registerForWorker(@RequestBody LoginForWorkReqDTO loginForWorkReqDTO) {
        registerService.registerAsForWorker(loginForWorkReqDTO);
        return new Result(200, "注册成功", (Object)null);
    }


}
